/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						script_variable_expression.cpp

	$Header: /heroes4/script_variable_expression.cpp $

	$NoKeywords: $

 ************************************************************************/

// kill the 255+ character identifier warning.  Templates tend to exceed that easily.
#include "precompiled.h"
#pragma warning( disable: 4786 )

#include "script_variable_expression.h"
#include "adventure_map.h"

t_script_numeric_variable::t_result 
t_script_numeric_variable::evaluate(t_expression_context_global const& context) const
{
	assert(context.map);
	int value;
	if (context.map->get_numeric_script_variable(get_name(), value) == false)
		return 0;
	else
		return value;
}

t_script_boolean_variable::t_result 
t_script_boolean_variable::evaluate(t_expression_context_global const& context) const
{
	assert(context.map);
	bool value;
	if (context.map->get_boolean_script_variable(get_name(), value) == false)
		return false;
	else
		return value;
}

